package com.cmict.data.infra.controller.admin.rdb.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

@ApiModel("管理后台 - 数据库创建 Request VO")
@Data
@ToString(callSuper = true)
public class RdbTest {


    @ApiModelProperty(value = "库类型", required = true)
    @NotNull(message = "库类型不能为空")
    @Size(max = 15, message = "库类型长度不能超过15个字符")
    private String type;

    @ApiModelProperty(value = "数据库ip", required = true)
    @NotNull(message = "数据库ip不能为空")
    @Size(max = 100, message = "数据库ip长度不能超过100个字符")
    private String ip;

    @ApiModelProperty(value = "数据库端口", required = true)
    @NotNull(message = "数据库端口不能为空")
    @Size(max = 10, message = "数据库端口长度不能超过10个字符")
    private String port;

    @ApiModelProperty(value = "数据库账号", required = true)
    @NotNull(message = "数据库账号不能为空")
    @Size(max = 50, message = "数据库账号长度不能超过50个字符")
    private String username;

    @ApiModelProperty(value = "数据库密码", required = true)
    @NotNull(message = "数据库密码不能为空")
    private String password;

    @ApiModelProperty(value = "数据库名称", required = true)
    @NotNull(message = "数据库名称不能为空")
    @Size(max = 50, message = "数据库名称长度不能超过50个字符")
    private String databaseName;

}
